/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package upc.jfactory.scp.jpa.bean;

import java.io.Serializable;
import javax.persistence.Basic;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Id;
import javax.persistence.NamedQueries;
import javax.persistence.NamedQuery;
import javax.persistence.Table;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
/**
 *
 * @author Diego
 */
@Entity
@Table(name = "OfertaEmpresa", catalog = "DAEPIFS_DB", schema = "dbo")
@NamedQueries({
    @NamedQuery(name = "OfertaEmpresa.findAll", query = "SELECT o FROM OfertaEmpresa o"),
    @NamedQuery(name = "OfertaEmpresa.findByOfertaempresaId", query = "SELECT o FROM OfertaEmpresa o WHERE o.ofertaempresaId = :ofertaempresaId"),
    @NamedQuery(name = "OfertaEmpresa.findByEmpresaId", query = "SELECT o FROM OfertaEmpresa o WHERE o.empresaId = :empresaId")})
public class OfertaEmpresa implements Serializable {
    private static final long serialVersionUID = 1L;
    @Id
    @Basic(optional = false)
    @GeneratedValue(strategy = GenerationType.IDENTITY)
    @Column(name = "ofertaempresa_id", nullable = false)
    private Integer ofertaempresaId;
    @Column(name = "empresa_id")
    private Integer empresaId;

    public OfertaEmpresa() {
    }

    public OfertaEmpresa(Integer ofertaempresaId) {
        this.ofertaempresaId = ofertaempresaId;
    }

    public Integer getOfertaempresaId() {
        return ofertaempresaId;
    }

    public void setOfertaempresaId(Integer ofertaempresaId) {
        this.ofertaempresaId = ofertaempresaId;
    }

    public Integer getEmpresaId() {
        return empresaId;
    }

    public void setEmpresaId(Integer empresaId) {
        this.empresaId = empresaId;
    }

    @Override
    public int hashCode() {
        int hash = 0;
        hash += (ofertaempresaId != null ? ofertaempresaId.hashCode() : 0);
        return hash;
    }

    @Override
    public boolean equals(Object object) {
        // TODO: Warning - this method won't work in the case the id fields are not set
        if (!(object instanceof OfertaEmpresa)) {
            return false;
        }
        OfertaEmpresa other = (OfertaEmpresa) object;
        if ((this.ofertaempresaId == null && other.ofertaempresaId != null) || (this.ofertaempresaId != null && !this.ofertaempresaId.equals(other.ofertaempresaId))) {
            return false;
        }
        return true;
    }

    @Override
    public String toString() {
        return "upc.jfactory.scp.jpa.bean.OfertaEmpresa[ofertaempresaId=" + ofertaempresaId + "]";
    }

}
